import {createBrowserRouter} from "react-router-dom";
import Login from "../view/Login/Login";
import Layout from "@/layout/Layout";
import Department from "@/view/Department/Department";
import Home from "@/view/Home/Home";
import Role from "@/view/Role/Role";
import Employee from "@/view/Employee/Employee";
import Permission from "@/view/Permission/Permission";
import Attendance from "@/view/Attendance/Attendance";
import Approval from "@/view/Approval/Approval";
import Salary from "@/view/Salary/Salary";
import Social from "@/view/Social/Social";


const router = createBrowserRouter([
    {
        path: "/login",
        element: <Login></Login>
    },
    {
        path: "/",
        element: <Layout></Layout>,
        children: [
            {
                index: true,
                element: <Home></Home>
            }
        ]
    },
    {
        path: "/department",
        element: <Layout></Layout>,
        children: [
            {
                index: true,
                element: <Department></Department>
            }
        ]
    },
    {
        path: "/role",
        element: <Layout></Layout>,
        children: [
            {
                index: true,
                element: <Role></Role>
            }
        ]
    },
    {
        path: "/employee",
        element: <Layout></Layout>,
        children: [
            {
                index: true,
                element: <Employee></Employee>
            }
        ]
    },
    {
        path: "/permission",
        element: <Layout></Layout>,
        children: [
            {
                index: true,
                element: <Permission></Permission>
            }
        ]
    },
    {
        path: "/attendance",
        element: <Layout></Layout>,
        children: [
            {
                index: true,
                element: <Attendance></Attendance>
            }
        ]
    },
    {
        path: "/approval",
        element: <Layout></Layout>,
        children: [
            {
                index: true,
                element: <Approval></Approval>
            }
        ]
    },
    {
        path: "/salary",
        element: <Layout></Layout>,
        children: [
            {
                index: true,
                element: <Salary></ Salary>
            }
        ]
    },
    {
        path: "/social",
        element: <Layout></Layout>,
        children: [
            {
                index: true,
                element: <Social></Social>
            }
        ]
    },

])


export default router;
